package com.time.social.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 社交登录配置类
 *
 * @author: HuangQi
 * @date: Created in 2025/01/XX
 * @description: 社交登录配置类
 */
@Data
@Component
@ConfigurationProperties(prefix = "social")
public class SocialConfig {

    /**
     * 回调基础URL
     */
    private String callbackBaseUrl;

    /**
     * 微信配置
     */
    private WxConfig wx;

    /**
     * GitHub配置
     */
    private GitHubConfig github;

    /**
     * QQ配置
     */
    private QQConfig qq;

    @Data
    public static class WxConfig {
        /**
         * 微信AppID
         */
        private String appId;

        /**
         * 微信AppSecret
         */
        private String appSecret;

        /**
         * 微信回调地址
         */
        private String redirectUri;
    }

    @Data
    public static class GitHubConfig {
        /**
         * GitHub Client ID
         */
        private String clientId;

        /**
         * GitHub Client Secret
         */
        private String clientSecret;

        /**
         * GitHub回调地址
         */
        private String redirectUri;
    }

    @Data
    public static class QQConfig {
        /**
         * QQ AppID
         */
        private String appId;

        /**
         * QQ AppKey
         */
        private String appKey;

        /**
         * QQ回调地址
         */
        private String redirectUri;
    }
}

